<template>
  <div>
    <el-dialog
      title="策略管理"
      :visible="dialogVisible1"
      width="32%"
      @close="handleClose"
    >
      <div>
        <span class="bianhao">机器编号:{{ queryVending.innerCode }}</span> <span class="clName">策略名称:{{ queryVending.policyName }}</span>
        <div class="fangan">策略方案:1%</div>
      </div>
      <span slot-="footer" class="dialog-footer">
        <el-button @click="handleClose">取消策略</el-button>
      </span>
    </el-dialog>
  </div>
</template>

<script>
import { delStrategyAPI } from '@/api/vmIndex'
export default {
  name: 'DialogCelue',
  components: {},
  props: {
    queryVending: {
      type: Object,
      default: () => ({})
    },
    dialogVisible1: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {
      // innerCode: '',
      // policyId: ''
    }
  },
  computed: {},
  watch: {},
  created() {
  },
  methods: {
    // 取消策略
    async handleClose() {
      await delStrategyAPI(this.queryVending.innerCode, this.queryVending.policyId)
      this.$emit('update:dialogVisible1', false) // 关闭窗口
    }
  }
}

</script>

<style scoped lang="scss">
.clName{
  margin-left: 100px;
}
.bianhao{
  margin-left: 20px;
}
.fangan{
  margin-left: 20px;
  margin-top: 20px;
}
</style>
